<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
    Object validTime    = session.getAttribute("validTime");
    if(validTime != null && validTime.equals(-1)) {
        session.removeAttribute("userAttr");
        session.removeAttribute("validTime");
    }
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>投票主页</title>
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/index.css" />
</head>
<body>
    <div class="wrap">
    	<div class="header">
            <h1>投票入口</h1>
        </div>
    	<div class="content">
    	    <div class="ad">
                <h2>Welcome to my poll system...</h2>
            </div>
    	    <div class="user_login_regist">
	    	    <div class="regist_form">
	    	        <form method="post" action="./regist" name="regist_form" id="regist_form_id">
	                   <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#eeeeee">
                        	<tr>
                        		<td>用户名：</td>
                        		<td><input type="text" name="user_name" value="" class="text_input"/></td>
                        		<td id="hint_user_name_id">说明：</td>
                        	</tr>
                        	<tr>
                        		<td>用户密码：</td>
                        		<td><input type="password" name="user_passwd" value="" class="text_input" /></td>
                        		<td id="hint_user_passwd_id">说明：</td>
                        	</tr>
                        	<tr>
                        		<td>重复密码：</td>
                        		<td><input type="password" name="reuser_passwd" value="" class="text_input" /></td>
                        		<td id="hint_reuser_passwd_id">说明：</td>
                        	</tr>
                        	<tr>
                        		<td>用户邮箱：</td>
                        		<td><input type="text" name="user_email" value="" class="text_input" /></td>
                        		<td id="hint_user_email_id">说明：</td>
                        	</tr>
                        	<tr>
                        		<td colspan="3"">
                                    <input type="submit" value="注册为新用户" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="reset" value="重置注册信息" />
                                </td>
                        	</tr>
                        </table>
                    </form>
	    	    </div>
	            <div class="login_form">
	               <form method="post" action="./login" name="login_form" id="login_form_id">
	                   <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#eeeeee">
	                   	<tr>
                            <td colspan="2">用户登陆</td>
                        </tr>
	                   	<tr>
                            <td>用户名：</td>
                            <td><input type="text" name="user_name" value="" class="text_input"/></td>
                        </tr>
	                   	<tr>
                            <td>用户密码：</td>
                            <td><input type="password" name="user_passwd" class="text_input" /></td>
                        </tr>
	                   	<tr>
                            <td><input type="submit" value="进入投票系统"/></td>
                            <td><input type="reset" value="重置登陆信息"/></td>
                        </tr>
	                   </table> 
	               </form>
	            </div>	
    	    </div>
    	</div>
        <jsp:include page="./comm/footer.jsp" flush="true"/> 
    </div>
</body>
</html>